using System;
using System.Collections.Generic;

namespace SilverMenu
{
	public class SilverMenu
	{
		/// <summary>
		/// All pages to which this menu can transit.
		/// </summary>
		public Dictionary<String, Page> Pages;

		public double Version;

		public SilverMenu()
		{
			Pages = new Dictionary<String, Page>();
		}

        public GUIElement GetElement(string name)
        {
            foreach (var page in Pages)
            {
                GUIElement ge = page.Value.GetElement(name);
                if (ge != null)
                    return ge;
            }

            return null;
        }
	}
}
